﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using PeliGo.BL;
using PeliGo.DataModel;

namespace PeliGo.UI
{
    public partial class frmPrincipal : Form
    {
        frmLogin frmL;
        Empleado Logeado;
        public frmPrincipal()
        {
            frmL = new frmLogin();
            frmL.ShowDialog();
            InitializeComponent();
        }

        private void registroToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void formatoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmAdmFormato frmF = new frmAdmFormato();
            frmF.MdiParent = this;
            frmF.Show();
        }

        private void géneroToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmAdmGenero frmF = new frmAdmGenero();
            frmF.MdiParent = this;
            frmF.Show();
        }

        private void peliculaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmAdmPelicula frmF = new frmAdmPelicula();
            frmF.MdiParent = this;
            frmF.Show();
        }

        private void ejemplarToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmAdmEjemplar frmF = new frmAdmEjemplar();
            frmF.MdiParent = this;
            frmF.Show();

        }

        private void empleadoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmAdmEmpleado frmF = new frmAdmEmpleado();
            frmF.MdiParent = this;
            frmF.Show();
        }

        private void promocionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmAdmPromocion frmF = new frmAdmPromocion();
            frmF.MdiParent = this;
            frmF.Show();
        }

        private void Menu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {

        }

        private void frmPrincipal_Load(object sender, EventArgs e)
        {
            Logeado = frmL.Emp;
            if (Logeado.Rol == 0)
            {
                registroToolStripMenuItem.Visible = false;
            }
           
        }
    }
}
